using System;
using System.Collections.Generic;

using AppPriceLive.Entities.Utils;
using AppPriceLive.Entities.Models;
using AppPriceLive.DAL;
using AppPriceLive.Common;

namespace AppPriceLive.Biz
{
	public class CurrencyGroupService
	{
		/// <summary>
		/// Saves a record to the CurrencyGroup table.
		/// </summary>
		public virtual void Insert(CurrencyGroupInfo currencyGroupInfo)
		{
			try
			{
				new CurrencyGroupDAO().Insert(currencyGroupInfo);
			}
			catch (Exception ex)
			{
				Logger.Error("AppPriceLive.Biz.CurrencyGroup - Insert", ex);
				throw;
			}

		}

		/// <summary>
		/// Saves a record to the CurrencyGroup table.
		/// </summary>
		public virtual void Update(CurrencyGroupInfo currencyGroupInfo)
		{
			try
			{
				new CurrencyGroupDAO().Update(currencyGroupInfo);
			}
			catch (Exception ex)
			{
				Logger.Error("AppPriceLive.Biz.CurrencyGroup - Update", ex);
				throw;
			}

		}

		/// <summary>
		/// Delete a record from the CurrencyGroup table.
		/// </summary>
		public virtual void Delete(int? currencyGroupId)
		{
			try
			{
				new CurrencyGroupDAO().Delete(currencyGroupId);
			}
			catch (Exception ex)
			{
				Logger.Error("AppPriceLive.Biz.CurrencyGroup - Delete", ex);
				throw;
			}

		}

		/// <summary>
		/// Selects a single record from the CurrencyGroup table.
		/// </summary>
		public virtual CurrencyGroupInfo Select(int? currencyGroupId)
		{
			try
			{
				return new CurrencyGroupDAO().Select(currencyGroupId);
			}
			catch (Exception ex)
			{
				Logger.Error("AppPriceLive.Biz.CurrencyGroup - Select", ex);
				throw;
			}

		}

		/// <summary>
		/// Selects all records from the CurrencyGroup table.
		/// </summary>
		public List<CurrencyGroupInfo> SelectAll()
		{
			try
			{
				return new CurrencyGroupDAO().SelectAll();
			}
			catch (Exception ex)
			{
				Logger.Error("AppPriceLive.Biz.CurrencyGroup - SelectAll", ex);
				throw;
			}

		}

	}
}
